//   js  动态类型    相同变量作用于不同类型

var  x;       // x 类型为  undefined;
var x= 5;      //  x 类型  number
var  x = "john";  // x 类型 string

//  变量的数据类型   typeof操作符查看

var  y = 123e5;      //1230000
var  z = 123e-5;     //0.00123

//   数组

var  cars = new Array();
cars[0] = "Saab";
cars[1] = "Volvo";
cars[2] = "BWM";

var cars = new Array("Saab","Volvo","BMW");
var cars=["Saab","Volvo","BMW"];

// js 对象 Object
var person = {firstname:"John",lastname:"Doe",id:5566};
name = person.lastname
name = person["lastname"];

name = person.fullName();

// 访问person对象的fullName属性，作为一个字符串返回
name = person.fullName;


